<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class named_mutex</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.named__mutex_8hpp" title="Header &lt;boost/interprocess/sync/named_mutex.hpp&gt;">
<link rel="prev" href="classboost_1_1interprocess_1_1named__condition__any.html" title="Class named_condition_any">
<link rel="next" href="classboost_1_1interprocess_1_1named__recursive__mutex.html" title="Class named_recursive_mutex">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1interprocess_1_1named__condition__any.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.named__mutex_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1interprocess_1_1named__recursive__mutex.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class named_mutex</span></h2>
<p>boost::interprocess::named_mutex</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.named__mutex_8hpp" title="Header &lt;boost/interprocess/sync/named_mutex.hpp&gt;">boost/interprocess/sync/named_mutex.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html" title="Class named_mutex">named_mutex</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>

  <span class="comment">// <a class="link" href="../boost_container_header_reference/classboost_1_1container_1_1scoped__allocator__adaptor.html#id90-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1aa349dfb8317ed2f38211e4492f9b105a"><span class="identifier">named_mutex</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1create__only__t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> 
              <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1addef062ead3bc044bc60ab9de12a2add"><span class="identifier">named_mutex</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__or__create__t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> 
              <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a0faba990ef7864c0c84640dd629dba80"><span class="identifier">named_mutex</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a31d8726d96f2557daf18b08411511d11"><span class="identifier">named_mutex</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1create__only__t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> 
              <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a91d9a09100684fdb3a7f98b9cd1324d9"><span class="identifier">named_mutex</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__or__create__t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> 
              <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1af06e8fdc888923e10bb08ecdb93590e6"><span class="identifier">named_mutex</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a0a80cd3771db97192d040a0d4a223508"><span class="special">~</span><span class="identifier">named_mutex</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a239dafee923c3a6e909c46805eed46b0"><span class="identifier">unlock</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a650543385847060b2b5dc9f21fea24e3"><span class="identifier">lock</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1ad24662e5bcb6e2fa56129302be7576c6"><span class="identifier">try_lock</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TimePoint<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1aba0a6043da6aa217c7d01653eb6358c7"><span class="identifier">timed_lock</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TimePoint<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a9ab8cf074058ab99e1c4f61e860bf9f5"><span class="identifier">try_lock_until</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Duration<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1af3ed6e2bb0846e809c75d3325d170edc"><span class="identifier">try_lock_for</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Duration</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="../boost_container_header_reference/classboost_1_1container_1_1scoped__allocator__adaptor.html#id91-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1ad9f58e1440cff141067e4dd4b94638aa"><span class="identifier">remove</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a569bacd4b463f96399485d807e5508cc"><span class="identifier">remove</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.16.19.3.69.4.4"></a><h2>Description</h2>
<p>A mutex with a global name, so it can be found from different processes. This mutex can't be placed in shared memory, and each process should have it's own <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html" title="Class named_mutex">named_mutex</a>. </p>
<div class="refsect2">
<a name="id-1.3.16.19.3.69.4.4.3"></a><h3>
<a name="id90-bb"></a><code class="computeroutput">named_mutex</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1aa349dfb8317ed2f38211e4492f9b105a"></a><span class="identifier">named_mutex</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1create__only__t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">,</span> 
            <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Creates a global mutex with a name. Throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a> on error. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1addef062ead3bc044bc60ab9de12a2add"></a><span class="identifier">named_mutex</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__or__create__t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">,</span> 
            <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Opens or creates a global mutex with a name. If the mutex is created, this call is equivalent to named_mutex(create_only_t, ... ) If the mutex is already created, this call is equivalent named_mutex(open_only_t, ... ) Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a0faba990ef7864c0c84640dd629dba80"></a><span class="identifier">named_mutex</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Opens a global mutex with a name if that mutex is previously created. If it is not previously created this function throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a31d8726d96f2557daf18b08411511d11"></a><span class="identifier">named_mutex</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1create__only__t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">,</span> 
            <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Creates a global mutex with a name. Throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a> on error.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a91d9a09100684fdb3a7f98b9cd1324d9"></a><span class="identifier">named_mutex</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__or__create__t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">,</span> 
            <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Opens or creates a global mutex with a name. If the mutex is created, this call is equivalent to named_mutex(create_only_t, ... ) If the mutex is already created, this call is equivalent named_mutex(open_only_t, ... ) Does not throw</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1af06e8fdc888923e10bb08ecdb93590e6"></a><span class="identifier">named_mutex</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Opens a global mutex with a name if that mutex is previously created. If it is not previously created this function throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a>.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a0a80cd3771db97192d040a0d4a223508"></a><span class="special">~</span><span class="identifier">named_mutex</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1ad9f58e1440cff141067e4dd4b94638aa">remove()</a>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a239dafee923c3a6e909c46805eed46b0"></a><span class="identifier">unlock</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Unlocks a previously locked mutex. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a650543385847060b2b5dc9f21fea24e3"></a><span class="identifier">lock</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Requires: The calling thread does not own the mutex.</p>
<p>Locks the mutex, sleeps when the mutex is already locked. Throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a> if a severe error is found</p>
<p>Note: A program may deadlock if the thread that has ownership calls this function. If the implementation can detect the deadlock, an exception could be thrown. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1ad24662e5bcb6e2fa56129302be7576c6"></a><span class="identifier">try_lock</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Requires: The calling thread does not own the mutex.</p>
<p>Tries to lock the mutex, returns false when the mutex is already locked, returns true when success. Throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a> if a severe error is found</p>
<p>Note: A program may deadlock if the thread that has ownership calls this function. If the implementation can detect the deadlock, an exception could be thrown. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TimePoint<span class="special">&gt;</span> <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1aba0a6043da6aa217c7d01653eb6358c7"></a><span class="identifier">timed_lock</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span> abs_time<span class="special">)</span><span class="special">;</span></pre>
<p>Requires: The calling thread does not own the mutex.</p>
<p>Tries to lock the the mutex until time abs_time, Returns false when timeout expires, returns true when locks. Throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a> if a severe error is found</p>
<p>Note: A program may deadlock if the thread that has ownership calls this function. If the implementation can detect the deadlock, an exception could be thrown. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TimePoint<span class="special">&gt;</span> <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a9ab8cf074058ab99e1c4f61e860bf9f5"></a><span class="identifier">try_lock_until</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span> abs_time<span class="special">)</span><span class="special">;</span></pre>
<p>Same as <code class="computeroutput">timed_lock</code>, but this function is modeled after the standard library interface. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Duration<span class="special">&gt;</span> <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1af3ed6e2bb0846e809c75d3325d170edc"></a><span class="identifier">try_lock_for</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Duration</span> <span class="special">&amp;</span> dur<span class="special">)</span><span class="special">;</span></pre>
<p>Same as <code class="computeroutput">timed_lock</code>, but this function is modeled after the standard library interface. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.16.19.3.69.4.4.4"></a><h3>
<a name="id91-bb"></a><code class="computeroutput">named_mutex</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1ad9f58e1440cff141067e4dd4b94638aa"></a><span class="identifier">remove</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Erases a named mutex from the system. Returns false on error. Never throws. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__mutex_1a569bacd4b463f96399485d807e5508cc"></a><span class="identifier">remove</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Erases a named mutex from the system. Returns false on error. Never throws.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005-2024 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1interprocess_1_1named__condition__any.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.named__mutex_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1interprocess_1_1named__recursive__mutex.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
